cmake_minimum_required(VERSION 3.0)
project(MemoryUsage VERSION 1.0.0)

set(CMAKE_CXX_FLAGS "-static -static-libgcc -static-libstdc++ -Wall -fpermissive")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -Og")

add_definitions(-DPROJECT_NAME="${CMAKE_PROJECT_NAME}")
add_definitions(-DPROJECT_EXPORT=${CMAKE_PROJECT_NAME})
add_definitions(-DPROJECT_VERSION="${CMAKE_PROJECT_VERSION}")

set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)

set(USE_RBL_MINHOOK_RUNTIME true)

set(CMAKE_INSTALL_PREFIX "./build/")

include_directories("include/")

add_library(${CMAKE_PROJECT_NAME} SHARED
	src/main.cpp
)

set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES PREFIX "")

target_link_libraries(${CMAKE_PROJECT_NAME}
	psapi
)

set(EXECUTABLE_OUTPUT_PATH ${dir}release)
set(LIBRARY_OUTPUT_PATH ${dir}release)

